#pragma once

#include "Duplicate/Duplicate.h"


//塔防副本
class TowerDuplicate : public Duplicate
{
public:
	////////////////////////////////  Duplicate  //////////////////////////////////////////
	//初始化
	virtual bool Init(uint32_t nDuplicateID, uint32_t nSceneID, IBrushMonster *pBrush);
	//
	virtual void UnInit();
	//获取功勋
	virtual int32_t GetExploit(CharIDType charId);
	//购买功勋商店物品  costExploit : 购买物品需要消耗的功勋
	virtual void BuyExploitItem(CharIDType charId, int32_t costExploit);
protected:
	virtual void OnReady_State();
	virtual void OnBegin_State();
	virtual void OnFinish_State();
	virtual void OnFlop_State();
	virtual void OnClean_State();
	virtual void OnDestory_State();
	//定时器更新
	virtual void OnTimerUpdate(uint32_t nTimerID);
	//执行事件
	virtual void OnExecuteEvent(uint16_t nEventID, uint32_t nSrcID, uint8_t bySrcType, void *pContext, int32_t nLen);
	//生物进入场景
	virtual void OnCreatureEnter(Creature *pCreature);
	//生物离开副本
	virtual void OnPlayerLeave(Player *pPlayer);
	//是否能进入
	virtual bool OnCanEnter(Creature *pCreature);
	//进入区域
	virtual bool OnEnterArea(uint32_t nAreaID);
	//复活
	virtual void OnRelive(Player *pPlayer, int8_t byType);
	//主动离开副本之前 的处理 
	virtual void OnActiveBeforeLeave(CharIDType cid);
	//主动离开副本失败 处理
	virtual void OnActiveLeaveFaild(CharIDType cid) {};
public:
	explicit TowerDuplicate();
	virtual ~TowerDuplicate();
};